package com.fanbai.score.common.Utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by Administrator on 2017/3/31.
 *
 * @author lizhipei
 */

public class StringUtils {

    /**
     * 手机号效验
     *
     * @param mobiles
     * @return
     */
    public static boolean checkPhoneNumber(String mobiles) {
        Pattern p = Pattern.compile("[1][345678]\\d{9}");
        // Pattern p =
        // Pattern.compile("/^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(14[0-9]{1})|(17[0-9]{1}))+\\d{8})$/");
        Matcher m = p.matcher(mobiles);
        return m.matches();
    }
}
